#pragma once

#include "AbstractLock.h"
#include <QImage>
using namespace std;

class Card_CVR100UDDLL : public AbstractLock
{
public:	
	Card_CVR100UDDLL();
	~Card_CVR100UDDLL();
	
	bool ReadCard(int cardType,CardResult &ret);
	bool isVaild();

	virtual Json::Value DealCommand(QString cmd,Json::Value &param);
	bool checkParam(QString cmd,Json::Value &param,QString &error);	

	QString m_error;	

private:
	QString GetPeopleName();
	QString GetPeopleSex();
	QString GetPeopleNation();
	QString GetPeopleBirthday();
	QString GetPeopleAddress();
	QString GetPeopleIDCode();
	QString GetDepartment();
	QString GetStartDate();
	QString GetEndDate();
	QString GetNationCode();
	QString GetNationCodeStr();	
	QString GetPeopleChineseName();
	QString GetPeopleCertVersion();	
	QString GetCertType();	

	QDateTime m_checkTime;
	QString m_pluginPath;
	QByteArray writeImage(QImage image);
};